package com.cskaoyan.shopping.controller;

import com.cskaoyan.mall.commons.result.ResponseData;
import com.cskaoyan.mall.commons.result.ResponseUtil;
import com.cskaoyan.shopping.dto.PanelContentDto;
import com.cskaoyan.shopping.service.IContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("shopping")
public class NaviController {

    @Autowired
    private IContentService contentService;

    @GetMapping("navigation")
    public ResponseData<List<PanelContentDto>> navigation() {
        List<PanelContentDto> list = contentService.queryNavList();
        return new ResponseUtil<List<PanelContentDto>>().setData(list);
    }
}
